package org.tlipoca.smarticle.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.genntii.smcommon.result.PageResult;
import org.genntii.smdomain.dto.ArticleItemDTO;
import org.genntii.smdomain.entity.Article;
import org.genntii.smdomain.vo.ArticleDetailVO;
import org.genntii.smdomain.vo.ArticleVO;
import org.springframework.web.multipart.MultipartFile;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Map;

public interface ArticleService extends IService<Article> {
    ArrayList<ArticleVO> getArticleLimit(Long userId, Integer pageNum, Integer pageSize);

    ArrayList<ArticleVO> getArticleVObyIds(ArrayList<Long> ids, Long userId);

    ArrayList<ArticleVO> getArticleByUserId(Long userId);

    Boolean articleExistsService(Long articleId);

    void addArticleService(ArticleItemDTO articleItemDTO,String ipv4,Long userId);

    void deleteArticleService(Long articleId);

    void updateArticleStatusService(Long articleId, Integer status);

    void updateArticleService(Long articleId, ArticleItemDTO articleItemDTO);

    ArticleDetailVO getArticleByIdService(Long articleId, Long userId);

    ArrayList<ArticleDetailVO> getArticleListByIdsService(ArrayList<Long> ids, Long userId);

    ArrayList<ArticleVO> articleList(ArrayList<Long> ids);

    void articleLikeUpdate(int like, int dislike, Long ArticleId);

    Map<Integer, String> BatchUpload(MultipartFile[] files);

    PageResult<ArticleVO> getLatestArticle(Integer pageNum, Integer pageSize, Integer order, Integer subscribeFilter, Long userId);

    ArrayList<ArticleVO> getArticleByChannel(Integer pageNum, Integer pageSize, Long channelId);

    ArrayList<ArticleVO> getArticleByChannelD(Integer pageNum, Integer pageSize, Long channelId, String keyword, LocalDateTime latestUpdateTime, Byte type,Byte subscribe);

    void setFollower(Integer follower, Long userId);

    Long getTotalUserArticleByUserId(Long userId);

    void setLike(Integer like,Integer dislike, Long articleId);
}
